Skip to content

Refactor/cleanup error handling code#20814

Merged
ilevkivskyi merged 3 commits intopython:masterfrom
ilevkivskyi:cleanup-errors
Feb 16, 2026
Merged

Refactor/cleanup error handling code#20814
ilevkivskyi merged 3 commits intopython:masterfrom
ilevkivskyi:cleanup-errors

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

@ilevkivskyi ilevkivskyi commented Feb 14, 2026

Various things in this PR:

  • Minimized breakages of abstraction layers
  • Added/updated docstrings/comments
  • More consistent argument/attribute naming
  • Removed redundant attributes/arguments (most important part probably)
  • Fixed inconsistent order of arguments in helpers
  • Added few asserts
  • Removed some redundant normalizations w.r.t. defaults

This is 99% pure refactoring (that removes 100 lines of code), the only non-trivial (but still minor) things are:

  • Fix end line/column for f-strings
  • More consistent error formatting for some of the errors

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@ilevkivskyi
Copy link
Copy Markdown
Member Author

I have another PR, and this is essentially pure refactoring (and I didn't hear any objections), so I am going to merge this to simplify my life.

@ilevkivskyi ilevkivskyi merged commit 1102e91 into python:master Feb 16, 2026
24 checks passed
@ilevkivskyi ilevkivskyi deleted the cleanup-errors branch February 16, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant